﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Contract.Infrastructure.Migrations
{
    public partial class InilCreate : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Contract",
                columns: table => new
                {
                    ContractId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ContractNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ContractTitle = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ShipperEnterprise = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ShipperPrincipal = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Route = table.Column<int>(type: "int", nullable: true),
                    TonTransport = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Tonnage = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    CharterAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Responsible = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    SigningDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ContractAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    ContractObject = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    MainClause = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
                    ContractText = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ContractType = table.Column<int>(type: "int", nullable: true),
                    FreightStatus = table.Column<int>(type: "int", nullable: true),
                    Abnormity = table.Column<int>(type: "int", nullable: true),
                    State = table.Column<int>(type: "int", nullable: true),
                    Approver = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Coordinate = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AuditState = table.Column<int>(type: "int", nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Contract", x => x.ContractId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Contract");
        }
    }
}
